package com.swx.identityservice.service.impl;


import com.swx.identityservice.dtos.scbpuser.UserOutputDto;
import com.swx.identityservice.mapper.ScbpUserMapper;
import com.swx.identityservice.models.ScbpUser;
import com.swx.identityservice.service.ScbpUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/*
 * @method: 用户服务
 * @author: halower
 * @date: 2018-4-15
 * */
@Service
public class ScbpUserServiceImpl extends CrudServiceImpl<ScbpUser> implements ScbpUserService {

    @Autowired
    private ScbpUserMapper mapper;

    @Override
    public List<ScbpUser> selectAllWithOutDeletedByUserAndWorkNum(
        String affiliateddept, String WorkNum, String UserName, String Account,
        String PhoneNumber, String Email,
        String IdNumber, String CardType, Boolean IsInformal) {
        return mapper.selectAllWithOutDeletedByUserAndWorkNum(affiliateddept, WorkNum, UserName, Account, PhoneNumber,
            Email, IdNumber, CardType, IsInformal);
    }

    @Override
    public List<ScbpUser> selectUsersByDeptId(Integer id) {
        return mapper.selectUsersByDeptId(id);
    }

    @Override
    public int selectCountByDeptId(int id) {
        return mapper.selectCountByDeptId(id);
    }

    @Override
    public List<ScbpUser> selectUsersAndRolesById(Integer id) {
        return mapper.selectUsersAndRolesById(id);
    }

    @Override
    public List<ScbpUser> selectDeptsByUserId(Integer id) {
        return mapper.selectDeptsByUserId(id);
    }

    @Override
    public ScbpUser selectUserByName(String name) {
        return mapper.selectUserByName(name);
    }

    @Override
    public int selectCountByRoleId(Integer RoleIds) {
        return mapper.selectCountByRoleId(RoleIds);
    }
}


